package form.ui.component.Slider
{

	import form.ui.core.ProgrammaticSkin;

	/**
	 *  The skin for the highlighted state of the track of a Slider.
	 */
	public class SliderHighlightSkin extends ProgrammaticSkin
	{
		
		public var themeColor:uint = 0xFFFFFF;
		//--------------------------------------------------------------------------
		//
		//  Constructor
		//
		//--------------------------------------------------------------------------
	
	    /**
		 *  Constructor.
		 */
		public function SliderHighlightSkin()
		{
			super();
		}
	
		//--------------------------------------------------------------------------
		//
		//  Overridden properties
		//
		//--------------------------------------------------------------------------
	
		//----------------------------------
		//  measuredWidth
		//----------------------------------
	
		/**
		 *  @private
		 */
		override public function get measuredWidth():Number
		{
			return 1;
		}
	
		//----------------------------------
		//  measuredHeight
		//----------------------------------
	
		/**
		 *  @private
		 */
		override public function get measuredHeight():Number
		{
			return 2;
		}
		
		//--------------------------------------------------------------------------
		//
		//  Overridden methods
		//
		//--------------------------------------------------------------------------
		
	    /**
		 *  @private
		 */
		override protected function updateDisplayList(w:Number, h:Number):void
		{
			super.updateDisplayList(w, h);
	
			var themeColor:int = themeColor;
			
			graphics.clear();
					
			// Highlight
			drawRoundRect(
				0, 0, w, 1, 0,
				themeColor, 0.7);
			drawRoundRect(
				0, h - 1, w, 1, 0,
				themeColor, 1);
			drawRoundRect(
				0, h - 2, w, 1, 0,
				themeColor, 0.4);
		}
	}

}
